package shop;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DeleteProductScreen implements Screen{
	private Console console;
	private DeleteProduct DP;
	
	@Autowired
	public DeleteProductScreen(DeleteProduct dP, Console c) {
		super();
		DP = dP;
		console = c;
	}

	public void show(){
		console.println("---------Delete Product Screen---------");
		console.printf("Please input ID: ");
		String id = console.readLine();
		DP.deleteProduct(Long.valueOf(id));
	}

}
